﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

/// <summary>
///Web_TrainBLL 的摘要说明
/// </summary>
public class Web_TrainBLL
{
    Web_TrainDAL dal = new Web_TrainDAL();
	public Web_TrainBLL()
	{
		//
		//TODO: 在此处添加构造函数逻辑
		//
	}
    /// <summary>
    /// 获取培训标签列表
    /// </summary>
    /// <param name="area"></param>
    /// <returns></returns>
    public DataSet GetTrainTarget(string area)
    {
        Web_Train t = new Web_Train();
        t.sign = 0;
        t.area = area;
        return dal.GetTrainTarget(t);
    }
    /// <summary>
    /// 获取培训信息
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    public DataSet GetPlaceInfoById(int id)
    {
        Web_Train t = new Web_Train();
        t.sign = 1;
        t.id = id;

        return dal.GetTrainTarget(t);
    }
    /// <summary>
    /// 预约信息录入
    /// </summary>
    /// <param name="username"></param>
    /// <param name="area"></param>
    /// <param name="placenum"></param>
    /// <param name="reservenum"></param>
    /// <param name="isattend"></param>
    /// <returns></returns>
    public string InsertUserInfo(string username,string area, string placenum, string reservenum, int isattend)
    {
        Web_Train t = new Web_Train();
        t.sign = 0;
        t.username = username;
        t.area = area;
        t.placenum = placenum;
        t.reservenum = reservenum;
        t.isattend = isattend;

        return dal.InsertPlaceUser(t);
    }
}